package com.realgodo.site.entity.vocation;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.realgodo.site.entity.IdEntity;
import com.realgodo.site.entity.security.User;

/**
 * @author bijiqiang E-mail: bijiqiang@gmail.com
 * @version 创建时间：2009-12-12下午10:42:27
 * @since jdk1.5
 * @version 0.1
 */
@Entity(name = "UserVocation")
@Table(name = "user_vocation")
public class UserVocation extends IdEntity {

	private static final long serialVersionUID = -3790024896744955844L;
	
	private User user;
	private Vocation vocation;
	
	@OneToOne
	@JoinColumn(name = "user_id", referencedColumnName = "id", nullable = false)
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	@OneToOne
	@JoinColumn(name = "vacation_id", referencedColumnName = "id", nullable = false)
	public Vocation getVocation() {
		return vocation;
	}
	public void setVocation(Vocation vocation) {
		this.vocation = vocation;
	}

	
	
	

}
